home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / OpenDoc 1.2b2c1 / OpenDoc / Interfaces / CPlusPlus / ODAplEvt.xh < prev    next >
Encoding:
Text File  |  1997-02-13  |  3.5 KB  |  165 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: ODAplEvt.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxh.dll: 2.33
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *  Classes defined in this interface
  13.  * 
  14.  */
  15.  
  16.  
  17. #ifndef SOM_ODAppleEvent_xh
  18. #define SOM_ODAppleEvent_xh
  19.  
  20. class ODAppleEvent;
  21.  
  22. #define ODAppleEvent_MajorVersion 1
  23. #define ODAppleEvent_MinorVersion 0
  24.  
  25. /* C++ SOM defs */
  26. #include <somcls.xh>
  27. #include <somcm.xh>
  28.  
  29. /* C++ parent defs */
  30. #ifndef SOM_ODRecord_xh
  31. #include <ODRecord.xh>
  32. #endif
  33.  
  34. #ifndef ODAppleEvent_API
  35. #define ODAppleEvent_API
  36. /*
  37.  * -- The Class API
  38.  */
  39.  
  40. /*
  41.  * Start of user-defined types:
  42.  */
  43. class SOMClass;
  44. class SOMObject;
  45. class ODFrame;
  46. class ODFacet;
  47. class ODObject;
  48. class ODExtension;
  49. class ODDesc;
  50. class ODDescList;
  51. class ODRecord;
  52. class ODAppleEvent;
  53.  
  54. /*
  55.  * End of user-defined types.
  56.  */
  57.  
  58. #ifdef OLDIBMSOMAPISUPPORT
  59. #define ODAppleEventCClassData ODAppleEventClassData
  60. #define ODAppleEventNewClass(major,minor) somNewVersionedClassReference(ODAppleEvent,major,minor)
  61. #endif
  62.  
  63. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  64. #define ODAppleEventMetaClass SOMClass
  65.  
  66. #if PRAGMA_ALIGN_SUPPORTED
  67. #  pragma options align=power
  68. #endif
  69.  
  70. /* The API to the ODAppleEvent class object, and the methods it introduces. */
  71. SOMEXTERN struct ODAppleEventClassDataStructure {
  72. #ifdef OLDIBMSOMAPISUPPORT
  73.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  74. #else
  75.     long zero;
  76. #endif
  77.     somStaticClassInfo *sci;
  78.     somDToken        instanceDataToken;
  79.     long reserved [3];
  80.     somMToken InitODAppleEvent;
  81. } SOMDLINK ODAppleEventClassData;
  82.  
  83. #if PRAGMA_ALIGN_SUPPORTED
  84. #  pragma options align=reset
  85. #endif
  86.  
  87. #if !defined(ODAppleEvent_Class_Source) && !defined(SOM_Module_odaplevt_Source)
  88. #if PRAGMA_IMPORT_SUPPORTED
  89. #pragma import list ODAppleEventClassData
  90. #endif
  91. #endif
  92.  
  93.  
  94. /*
  95.  * -- Typedefs and inline method declarations for left path inherited methods
  96.  * -- are omitted because this compilation had -museinheritedmethods in effect
  97.  */
  98.  
  99.  
  100. /*
  101.  * -- Typedefs for ODAppleEvent Method Procedures
  102.  */
  103. SOMEXTERN {
  104. typedef void   (* SOMLINK somTD_ODAppleEvent_InitODAppleEvent)(ODAppleEvent *somSelf, Environment *ev);
  105. }
  106.  
  107. #endif /* ODAppleEvent_API */
  108.  
  109.  
  110. /*
  111.  * -- This emitter treats Method Tokens as Thunks by default.
  112.  * -- Use the sc modifier "nothunks" to change this default
  113.  */
  114. #undef somresolve_
  115. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  116.  
  117. /*
  118.  * -- The C++ Wrapper Class for ODAppleEvent
  119.  */
  120. class ODAppleEvent : public ODRecord
  121. {
  122. public:
  123.  
  124. // ODAppleEvent::new registers use of the class object, and then uses somNew
  125. // to allocate memory and load the object method table pointer. 
  126. void *operator new(size_t size)
  127. {
  128.     SOM_IgnoreWarning(size);
  129.     // Allocate memory using the default allocator for ODAppleEvent, and
  130.     // clear mem & set method table pointer, call basic initialization
  131. #ifdef SOMCHKNULL
  132.     void * __somResult = (void *)
  133.       somNewObject(ODAppleEvent);
  134.     SOMCHKNULL(__somResult);
  135.     return __somResult;
  136. #else
  137.     return (void*) somNewObject(ODAppleEvent);
  138. #endif
  139. }
  140.  
  141. // ODAppleEvent::delete uses the default deallocator for the object's class.
  142. void operator delete(void * obj)
  143. {
  144.     if (obj) {
  145.         SOM_Resolve(obj,SOMObject,somFree)
  146.            ( (SOMObject*) obj );
  147.     }
  148. }
  149.  
  150. /* method: InitODAppleEvent */
  151. void   InitODAppleEvent(Environment *ev)
  152. {
  153.    SOM_ResolveD(this,ODAppleEvent,ODAppleEvent,InitODAppleEvent)
  154.     (this,ev);
  155. #ifdef SOMCHKEXCEPT
  156.       SOMCHKEXCEPT;
  157. #endif
  158. }
  159.  
  160. };   /* ODAppleEvent */
  161.  
  162.  
  163.  
  164. #endif       /* SOM_ODAppleEvent_xh */
  165.